package com.spring;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Component;

/**
 * 作者: LCG
 * 日期: 2020/3/5 19:59
 * 描述: 定义AOp切面
 */
@Aspect
@Component
public class TestAop {

    @Pointcut("execution(public * com.spring.test.*.*(..))")
    public void aop(){};

    @Before("aop()")
    public void doBefore(JoinPoint joinPoint){

        System.out.println("============");
    }

}
